package com.caine.androidtask.ls21.client;

import java.io.IOException;
import java.net.InetAddress;
import java.net.Socket;
import java.net.SocketException;
import java.net.UnknownHostException;

import android.R.bool;

import com.caine.androidtask.launcher.Utils;
import com.caine.androidtask.ls21.poxy.ClientInfo;
import com.caine.androidtask.ls21.poxy.Connection;

public class ClientServer{
	private Socket clientSocket;
	private Connection conn;

	public ClientServer() {
		InetAddress address;
		try {
			address = InetAddress.getLocalHost();
			clientSocket = new Socket(address, Utils.SOCKET_PORT);
		} catch (UnknownHostException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException o) {
			o.printStackTrace();
		}

	}

	public boolean connection(ClientInfo info) {
		// TODO Auto-generated method stub
		this.conn.connection(info);
		return true;
	}

	public boolean disconnection(ClientInfo info) {
		// TODO Auto-generated method stub
		this.conn.disconnection(info);
		return true;
	}

}
